# ifndef __HoluxWrt_H_
# define __HoluxWrt_H_

# ifdef _MSC_VER
#	pragma pack (push, 1)
# endif

const DWORD c_dwWrtWptSignature = 0x5C38A600;
const size_t c_cWrtMaxWaypoints = 500;

struct CWrtWaypointsHdr {
	DWORD dwSignature;

	WORD  wCurrentWaypoints;
	WORD  wNextWaypoints;

	WORD  wIdx [c_cWrtMaxWaypoints];
	BYTE  btUsed [c_cWrtMaxWaypoints];
};

struct CWrtWaypoint {
	char  strName [8];
	char  strComment [12];

	LONG  lX, lY;

	DWORD dwDate;
	DWORD dwTime;

	WORD  wRoutesRefs;
	BYTE  btActive;
	BYTE  btReserved;
};

const DWORD c_dwWrtRoutesSignature = 0xD87F5900;
const size_t c_cWrtMaxRoutes = 20;
const size_t c_cWrtMaxWaypointsInRoute = 30;

struct CWrtRoutesHdr {
	DWORD dwSignature;

	WORD wCurrentRoutes;
	WORD wNextRoutes;

	WORD wIdx [c_cWrtMaxRoutes];
	BYTE btUsed [c_cWrtMaxRoutes];

	WORD wNavigationRoute;

	WORD wReserved;
};

struct CWrtRoute {
	char  strName [8];
	char  strComment [12];

	WORD  wWaypoints;
	WORD  wWptIdx [c_cWrtMaxWaypointsInRoute];

	WORD  wReserved;

	DWORD dwDate;
	DWORD dwTime;
};

struct CWrtFile {
	CWrtWaypointsHdr WptHdr;
	CWrtWaypoint     Waypoints [c_cWrtMaxWaypoints];

	CWrtRoutesHdr    RoutesHdr;
	CWrtRoute        Routes [c_cWrtMaxRoutes];

	// NOTE: total size is 32K.
	BYTE             unused [9348];
};

# ifdef _MSC_VER
#	pragma pack (pop)
# endif

# endif // __HoluxWrt_H_